using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class CheckHit : MonoBehaviour, IPointerEnterHandler
{
    public ScoreManager Check;
    public InvincibleTime Inv;
    public void OnPointerEnter(PointerEventData eventData)
    {
        if (!Inv.In)//如果当前不是无敌状态
        {
            Debug.Log("!");
            Check.Hit();//调用Hit进行扣血操作
            Inv.In=true;//进入无敌状态
        }
    }
}
